package com.example.model.pojo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 教学资料实体类，对应数据库teaching_material表
 */
@Data
@Schema(name = "教学资料实体类", description = "教师上传的教学资料信息，对应数据库teaching_material表")
public class TeachingMaterial {
    @Schema(description = "资料ID，主键", required = true, example = "1")
    private Integer id;             // 资料ID，主键
    
    @Schema(description = "教学资料标题", required = true, example = "Java编程基础教程")
    private String title;           // 资料标题
    
    @Schema(description = "教学资料描述", example = "本资料包含Java基础语法、面向对象编程等内容")
    private String description;     // 资料描述
    
    @Schema(description = "文件在服务器上的存储路径", required = true, example = "/uploads/materials/2023/09/java_basic.pdf")
    private String filePath;        // 文件存储路径
    
    @Schema(description = "教学资料文件名", required = true, example = "Java编程基础教程.pdf")
    private String fileName;        // 文件名
    
    @Schema(description = "上传教师ID，外键关联user表", required = true, example = "5")
    private Integer uploadedBy;     // 上传教师ID，外键关联user表
    
    @Schema(description = "资料上传时间", required = true, example = "2023-09-01T09:00:00")
    private LocalDateTime uploadTime;        // 上传时间
}